package com.earl.eatbao.web;

import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;

import com.earl.eatbao.interceptor.StringEscapeEditor;

/**
 * The type Base controller.
 *
 * @author 黄祥谦.
 * @version :
 * @date:2016-1-15 上午11 :39:19
 */
public abstract class BaseController {

    /**
     * Init binder.
     *
     * @param binder the binder
     */
    @InitBinder
    public void initBinder(WebDataBinder binder) {
        binder.registerCustomEditor(String.class,
                new StringEscapeEditor(
                        true,
                        false,
                        false));
    }
}
